package baiqitun.stupro.subject.entity;

import baiqitun.stupro.common.constant.SysConstant;
import baiqitun.stupro.common.entity.Entity;
import baiqitun.stupro.common.validate.group.SaveGroup;
import baiqitun.stupro.common.validate.group.UpdateGroup;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;

/**
 * <p>
 * 科目表（专业方向表）
 * </p>
 *
 * @author kedaji
 * @since 2020-04-01
 */
@ApiModel("科目")
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("stupro_subject")
public class SysSubject extends Entity {

    private static final long serialVersionUID=1L;

    @ApiModelProperty("所属部门id")
    @Null(message = SysConstant.ER_PARAMETER_MUST_NULL,groups = {})
    @NotBlank(message = "部门id不能为空", groups = {SaveGroup.class, UpdateGroup.class})
    private String departId;

    @ApiModelProperty("父科目id")
    @NotBlank(message = "父科目id不能为空", groups = {SaveGroup.class, })
    private String parentId;

    @ApiModelProperty("科目名称")
    @NotBlank(message = "科目名称不能为空", groups = {SaveGroup.class, UpdateGroup.class})
    private String name;

}
